package com.youyou.login.config;



import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@RestControllerAdvice()
public class ExceptionAdvice {
    
    @ResponseStatus(HttpStatus.OK)
    @ExceptionHandler(Exception.class)
    public String handlerException(Exception e) {

        log.warn("订单系统内部错误:" + e.getMessage(), e);
        return "订单报错啦！赶紧抢修哇！";

    }
    

    
}
